package cn.wfu.rlrjds.app.repairman.dao.ipml;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import cn.wfu.rlrjds.app.bean.RepairmanSearch;
import cn.wfu.rlrjds.app.repairman.dao.IRepairmanDao;
import cn.wfu.rlrjds.app.repairman.domain.Repaireman;
import cn.wfu.rlrjds.app.user.domain.User;
import cn.wfu.rlrjds.common.dao.impl.MybatisDaoImpl;

@Repository(value = IRepairmanDao.SERVICE_NAME)
public class RepairmanDaoIpml extends MybatisDaoImpl<Repaireman, String>
		implements IRepairmanDao {

	public List<Repaireman> getAllRepairman() {
		return super.selectList("getAllRepairman");
	}

	@Override
	public List<Repaireman> getRepairmansByStatus() {
		// TODO Auto-generated method stub
		return super.selectList(MybatisDaoImpl.SQL_GETREPAIRMANSSTATUS);
	}

	@Override
	public void deleteByIdDeleteStatus(String id) {
		// TODO Auto-generated method stub
		super.update(SQL_UPDATEDELETE_STATUS, id);
	}

	@Override
	public void updateRepairemanIsLogin(Map<String, String> map) {
		// TODO Auto-generated method stub
		super.update(SQL_UPDATEREPAIREMANISLOGIN, map);
	}

	@Override
	public void updateRepairmanPassword(Repaireman repaireman) {
		// TODO Auto-generated method stub
		this.update(SQL_UPDATEUSERPASSWORD, repaireman);

	}

	@Override
	public void updateUserInfo(Repaireman repaireman) {
		// TODO Auto-generated method stub
		this.update(SQL_UPDATEUSERINFO, repaireman);
	}

}
